package org.benxiong.iplay.model;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import org.benxiong.iplay.util.Utils;

public class UserProfile {

	private String			dobString;
	private Integer			height;
	private Integer			weight;
	private Integer			heightInch;
	private Integer			weightPounds;
	private String			nickName;

	private Integer			measure;

	private int				roleIndex;
	private int				relationshipIndex;
	private int				buildIndex;
	private int				ethnicityIndex;

	private String			country;
	private String			place;

	private List<Integer>	lookingFor		= new ArrayList<Integer>();
	private List<Integer>	lang			= new ArrayList<Integer>();

	private String			facebook;
	private String			twitter;
	private String			weibo;
	private String			wechat;
	private String			instagram;
	private String			line;
	private String			kik;

	private String			status;
	private String			intro;
	private String			privateIntro;
	private String			myType;

	private boolean			unlocked;
	private boolean			blocked;
	private boolean			favorited;
	private boolean			meetup;

	private long			avatarVersion;
	private long			coverVersion;
	private long			profileVersion;

	private List<UserPhoto>	publicPhotos	= new ArrayList<UserPhoto>();
	private List<UserPhoto>	privatePhotos	= new ArrayList<UserPhoto>();

	public void addPhotos(List<UserPhoto> photos) {
		for (UserPhoto photo : photos) {
			if (photo.getAccess() == 0) {
				this.publicPhotos.add(photo);
			} else {
				this.privatePhotos.add(photo);
			}
		}
	}

	public String getDob() {
		if (!Utils.isEmpty(this.getDobString())) {
			try {
				Date date = new Date(Long.valueOf(this.getDobString()));
				SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
				return sdf.format(date);
			} catch (Exception e) {
				e.printStackTrace();
			}
		}
		return null;
	}

	public long getAvatarVersion() {
		return avatarVersion;
	}

	public void setAvatarVersion(long avatarVersion) {
		this.avatarVersion = avatarVersion;
	}

	public String getNickName() {
		return nickName;
	}

	public void setNickName(String nickName) {
		this.nickName = nickName;
	}

	public String getKik() {
		return kik;
	}

	public void setKik(String kik) {
		this.kik = kik;
	}

	public Integer getMeasure() {
		return measure;
	}

	public void setMeasure(Integer measure) {
		this.measure = measure;
	}

	public long getCoverVersion() {
		return coverVersion;
	}

	public void setCoverVersion(long coverVersion) {
		this.coverVersion = coverVersion;
	}

	public long getProfileVersion() {
		return profileVersion;
	}

	public void setProfileVersion(long profileVersion) {
		this.profileVersion = profileVersion;
	}

	public List<UserPhoto> getPublicPhotos() {
		return publicPhotos;
	}

	public void setPublicPhotos(List<UserPhoto> publicPhotos) {
		this.publicPhotos = publicPhotos;
	}

	public List<UserPhoto> getPrivatePhotos() {
		return privatePhotos;
	}

	public void setPrivatePhotos(List<UserPhoto> privatePhotos) {
		this.privatePhotos = privatePhotos;
	}

	public String getDobString() {
		return dobString;
	}

	public void setDobString(String dobString) {
		this.dobString = dobString;
	}

	public Integer getHeight() {
		return height;
	}

	public void setHeight(Integer height) {
		this.height = height;
	}

	public Integer getWeight() {
		return weight;
	}

	public void setWeight(Integer weight) {
		this.weight = weight;
	}

	public Integer getHeightInch() {
		return heightInch;
	}

	public void setHeightInch(Integer heightInch) {
		this.heightInch = heightInch;
	}

	public Integer getWeightPounds() {
		return weightPounds;
	}

	public void setWeightPounds(Integer weightPounds) {
		this.weightPounds = weightPounds;
	}

	public String getCountry() {
		return country;
	}

	public void setCountry(String country) {
		this.country = country;
	}

	public String getPlace() {
		return place;
	}

	public void setPlace(String place) {
		this.place = place;
	}

	public String getFacebook() {
		return facebook;
	}

	public void setFacebook(String facebook) {
		this.facebook = facebook;
	}

	public String getTwitter() {
		return twitter;
	}

	public void setTwitter(String twitter) {
		this.twitter = twitter;
	}

	public String getWeibo() {
		return weibo;
	}

	public void setWeibo(String weibo) {
		this.weibo = weibo;
	}

	public String getWechat() {
		return wechat;
	}

	public void setWechat(String wechat) {
		this.wechat = wechat;
	}

	public String getInstagram() {
		return instagram;
	}

	public void setInstagram(String instagram) {
		this.instagram = instagram;
	}

	public String getLine() {
		return line;
	}

	public void setLine(String line) {
		this.line = line;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getIntro() {
		return intro;
	}

	public void setIntro(String intro) {
		this.intro = intro;
	}

	public String getPrivateIntro() {
		return privateIntro;
	}

	public void setPrivateIntro(String privateIntro) {
		this.privateIntro = privateIntro;
	}

	public String getMyType() {
		return myType;
	}

	public void setMyType(String myType) {
		this.myType = myType;
	}

	public List<Integer> getLookingFor() {
		return lookingFor;
	}

	public void setLookingFor(List<Integer> lookingFor) {
		this.lookingFor = lookingFor;
	}

	public int getRoleIndex() {
		return roleIndex;
	}

	public void setRoleIndex(int roleIndex) {
		this.roleIndex = roleIndex;
	}

	public int getRelationshipIndex() {
		return relationshipIndex;
	}

	public void setRelationshipIndex(int relationshipIndex) {
		this.relationshipIndex = relationshipIndex;
	}

	public int getBuildIndex() {
		return buildIndex;
	}

	public void setBuildIndex(int buildIndex) {
		this.buildIndex = buildIndex;
	}

	public int getEthnicityIndex() {
		return ethnicityIndex;
	}

	public void setEthnicityIndex(int ethnicityIndex) {
		this.ethnicityIndex = ethnicityIndex;
	}

	public List<Integer> getLang() {
		return lang;
	}

	public void setLang(List<Integer> lang) {
		this.lang = lang;
	}

	public boolean isUnlocked() {
		return unlocked;
	}

	public void setUnlocked(boolean unlocked) {
		this.unlocked = unlocked;
	}

	public boolean isBlocked() {
		return blocked;
	}

	public void setBlocked(boolean blocked) {
		this.blocked = blocked;
	}

	public boolean isFavorited() {
		return favorited;
	}

	public void setFavorited(boolean favorited) {
		this.favorited = favorited;
	}

	public boolean isMeetup() {
		return meetup;
	}

	public void setMeetup(boolean meetup) {
		this.meetup = meetup;
	}

	@Override
	public String toString() {
		return "UserProfile [dobString=" + dobString + ", height=" + height + ", weight=" + weight + ", heightInch=" + heightInch + ", weightPounds="
				+ weightPounds + ", roleIndex=" + roleIndex + ", relationshipIndex=" + relationshipIndex + ", buildIndex=" + buildIndex
				+ ", ethnicityIndex=" + ethnicityIndex + ", country=" + country + ", place=" + place + ", lookingFor=" + lookingFor + ", lang="
				+ lang + ", facebook=" + facebook + ", twitter=" + twitter + ", weibo=" + weibo + ", wechat=" + wechat + ", instagram=" + instagram
				+ ", line=" + line + ", status=" + status + ", intro=" + intro + ", privateIntro=" + privateIntro + ", myType=" + myType + "]";
	}

}
